<?php 
class CHomeController extends CController{

	function __construct() {
		parent::__construct();
		return true;
	}
	
	function initialize() {
		parent::initialize();
		return true;
	}
	
	function execute() {
		
		switch( $this->m_strAction ) {
			case NULL:
			
			case 'default':
				$this->handleViewHomePage();
				break;
			
			case 'page_not_found':
				$this->handleViewPageNotFound();
				break;
			
			default:
				$this->handleViewPageNotFound();
				
		}
	}

	/*************************************
	********** HANDLE FUNCTIONS **********
	*************************************/
	
	function handleViewHomePage() {
	
		$this->displayViewHomePage();
	}
	
	function handleViewPageNotFound() {
		$this->displayViewPageNotFound();
	}

	/**************************************
	********** DISPLAY FUNCTIONS **********
	**************************************/	
		
	function displayViewHomePage() {
	
		parent::display();	
		$this->m_objSmarty->display( TEMPLATE_DIR_PATH . '/home/index.tpl');
	
	}
	
	function displayViewPageNotFound() {
		
		parent::display();	
		$this->m_objSmarty->display( TEMPLATE_DIR_PATH . '/admin/home/index.tpl');

	}

}
?>